import { defineStore } from 'pinia'

export const useAppStore = defineStore('app', () => {
  const darkMode = ref(false)
  const statusBarHeight = ref(0)
  const menuButtonBounding = ref()
  const customBarHeight = computed(() =>
    !menuButtonBounding.value
      ? 0
      : menuButtonBounding.value.bottom + menuButtonBounding.value.top - statusBarHeight.value,
  )

  return {
    darkMode,
    statusBarHeight,
    customBarHeight,
    menuButtonBounding,
  }
})
